Skip to content

refactor(hmr): Adopt AbortSignal for effect cancellation in Runtime #828

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 23, 2025

Conversation

manzt
Copy link
Owner

@manzt manzt commented Mar 18, 2025

This PR updates the HMR Runtime to rely on AbortSignal for canceling reactive effects and managing widget lifecycle.

It removes createResource in favor of manual createEffect coordination with a simplified Result type. Also adds a 2-second timeout in the initializer such that awaiting .ready will throw with a clear message if never resolves.

Copy link

changeset-bot bot commented Mar 18, 2025

⚠️ No Changeset found

Latest commit: bb57f74

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@manzt manzt force-pushed the manzt/more-abort-controller-updates branch 6 times, most recently from 3d002d7 to 6d7fcca Compare March 23, 2025 17:34
@manzt manzt force-pushed the manzt/more-abort-controller-updates branch from 6d7fcca to a66a2e2 Compare March 23, 2025 18:39
@manzt manzt changed the title refactor(anywidget): Clean up HMR internals rafactor(hmr): Adopt AbortSignal for effect cancellation in Runtime Mar 23, 2025
@manzt manzt force-pushed the manzt/more-abort-controller-updates branch from 79e562f to bb57f74 Compare March 23, 2025 18:55
@manzt manzt changed the title rafactor(hmr): Adopt AbortSignal for effect cancellation in Runtime refactor(hmr): Adopt AbortSignal for effect cancellation in Runtime Mar 23, 2025
@manzt manzt merged commit 029cbd0 into main Mar 23, 2025
11 checks passed
@manzt manzt deleted the manzt/more-abort-controller-updates branch March 23, 2025 18:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant